#include "CcTestVideoPlayer.h"

#include <QLabel>
#include <QStyle>
#include <QPainter>
#include <QPaintEngine>
#include <QGraphicsProxyWidget>
#include <QMenu>
#include <QApplication>
#include <QTimer>

CcTestVideoPlayer::CcTestVideoPlayer(QWidget *parent, QGraphicsScene* scene)
	: QGraphicsView(parent)
{
	if (scene)
	{
		scene->setParent(this);
	}
	setScene(scene ? scene : new QGraphicsScene(this));
    
    auto widget = new QWidget;
    widget->setStyleSheet("background:white;");
    widget->setFixedSize(QSize(300,420));
    
    scene->addWidget(widget)->setZValue(101);
}

CcTestVideoPlayer::~CcTestVideoPlayer()
{

}

void CcTestVideoPlayer::drawBackground(QPainter *painter, const QRectF &rect)
{
    QGraphicsView::drawBackground(painter, this->rect());
    painter->fillRect(geometry(), QBrush("#0c0b0f"));
}
